<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js基本语法</title>
</head>
<body>
    
</body>
<script>
    alert("demo");//分号可有可无
    var count = 3; //定义变量
    if(count == 3){
        alert(count);
    }

    //三种输出方式
    //window.alert() window可省略
    window.alert("alert输出")

    //document.write() 
    document.write("document输出") 

    //console.log()
    console.log("控制台输出")
    
</script>
</html>